package service

import (
	"context"

	pb "manage/api/class"
	"manage/app/class/internal/biz"
)

type ClassSevice struct {
	pb.UnimplementedClassServiceServer
	bz *biz.ClassUsecase
}

func NewClassSevice(bz *biz.ClassUsecase) *ClassSevice {
	return &ClassSevice{
		bz: bz,
	}
}

func (s *ClassSevice) CreateClass(ctx context.Context, req *pb.CreateClassRequest) (*pb.CreateClassResponse, error) {
	return s.bz.Create(ctx, req)
}
func (s *ClassSevice) DeleteClass(ctx context.Context, req *pb.DeleteClassRequest) (*pb.DeleteClassResponse, error) {
	return s.bz.Delete(ctx, req)
}
func (s *ClassSevice) UpdateClass(ctx context.Context, req *pb.UpdateClassRequest) (*pb.UpdateClassResponse, error) {
	return s.bz.Update(ctx, req)
}
func (s *ClassSevice) GetClass(ctx context.Context, req *pb.GetClassRequest) (*pb.GetClassResponse, error) {
	return s.bz.Get(ctx, req)
}
